package com.shrct.businessprocess.product.impl;

import com.shrct.businessprocess.product.RCServiceDuration;
import com.shrct.businessprocess.product.proxy.RCServiceDurationProxy;
import edu.fudan.langlab.domain.code.impl.CodeImpl;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("RCSERVICEDURATION_TYPE")
public class RCServiceDurationImpl extends CodeImpl implements RCServiceDuration {
  public RCServiceDurationImpl() {
    super();
  }
  
  public static RCServiceDuration create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.product.RCServiceDuration rCServiceDuration = new com.shrct.businessprocess.product.impl.RCServiceDurationImpl(
    );
    objectFactory.create(rCServiceDuration);
    return rCServiceDuration;			
    
  }
  
  public static RCServiceDuration createRCServiceDurationImpl(final IObjectFactory objectFactory, final Procedure1<RCServiceDuration> init) {
    com.shrct.businessprocess.product.RCServiceDuration rCServiceDuration = new com.shrct.businessprocess.product.impl.RCServiceDurationImpl(
    );
    objectFactory.create(rCServiceDuration);
    init.apply(rCServiceDuration);
    
    return rCServiceDuration;			
    
  }
  
  public RCServiceDurationProxy toProxy() {
    com.shrct.businessprocess.product.proxy.RCServiceDurationProxy proxy = new com.shrct.businessprocess.product.proxy.RCServiceDurationProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
